home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / networking / misc / parpc04.lha / hardware / docs / PARnetPC.doc < prev    next >
Encoding:
Text File  |  1993-09-02  |  15.7 KB  |  375 lines

  1.  
  2.                         PARNET-PC V0.4 (02-SEP-93)
  3.  
  4.                    A multi-host parallel network for PC's
  5.  
  6.                              by S.A.Pechler
  7.  
  8.  
  9.  
  10. NOTE: This text is written by a person with poor knowledge of the english
  11. language (me). When you discover some typo's, bad grammar, typical dutch
  12. expressions, etc., please let me know so I can correct them.
  13.  
  14.  
  15. Copyright Notice
  16.  
  17.       This PC-port of PARnet is based on the Amiga's PARNET.DEVICE. The
  18.       original Parallel Port Network code (PPN code) is Copyright (c)
  19.       1989 by Matthew Dillon. The NET: handler and NET: file system is
  20.       Copyright (c) 1988, 1989, 1990 by The Software Distillery.
  21.       Ethernet is a trademark of Xerox Corporation.
  22.  
  23.  
  24. General Overview
  25.  
  26.       This is the PC version of the well known PARnet.device driver on
  27.       the Amiga. It supports connections for two or MORE machines
  28.       together via a common, custom parallel port cable (centronics)
  29.       when using a special PARnet-interface. Without this interface it's
  30.       only a point to point network. The transfer rate of the network is
  31.       about 5.7KBytes/sec (5.3KBaud), but this varies on each type of
  32.       machine. Currently there is only software available for testing
  33.       the interface and a custom TCP/IP packet driver. With the packet
  34.       driver you are able to interface with programs like Telnet, FTP,
  35.       NFS and maybe even Novell-Lite. The PARnet NET:-device has not
  36.       been ported yet.
  37.  
  38.  
  39. Software Overview
  40.  
  41.       At the moment, PARnet-PC contains only the kernel-routines of the
  42.       PARnet device. It has less functions than the Amiga version, but it
  43.       is built for integration in any other low-level packet switching
  44.       applications (packetdrivers, NOS, etc.).
  45.  
  46.       A PARnet network is based on machine addresses and rendezvous
  47.       ports. It looks a bit like Ethernet-style connection, but PARnet
  48.       has the following limitations/features:
  49.  
  50.       - Each machine on the network must have a unique address in the
  51.         range 1-254. (0 and 255 are reserved)
  52.       - The network has no broadcast capability.
  53.       - Multiple connections may exist between any two machines. This
  54.         is done by including a destination port number in each packet.
  55.       - Two different protocol can be used:
  56.         DATA-GRAM protocol (used for sending semi-reliable data between
  57.         machines)
  58.         STREAM protocol (used for sending reliable data between
  59.         machines)
  60.  
  61.       Currently, only the DATA-GRAM protocol is used in the PC version.
  62.       The STREAM protocol is not even implemented in the Amiga
  63.       parnet.device, so why bother about it.
  64.       The portnumbers are embedded in the packets, but not interpreted
  65.       by the kernel routines. This can be done in a higher level
  66.       protocol.
  67.  
  68.       The following functions are implemented in the kernel:
  69.       - Setting the hardware address and PARnet parallel port for this
  70.         machine (ParAddress).
  71.       - Checking for a packet on the line addressed to me
  72.         (ParDataReady).
  73.       - Read a pending packet (ParRead).
  74.       - Write a packet (ParWrite).
  75.  
  76.  
  77. Low Level usage
  78.  
  79.       Before you can access the network you have to initialize the
  80.       parallel card on which the cable is connected. You also have to 
  81.       set the PARnet hardware address of the current machine. These
  82.       things are done by the ParAddress function. It requires two
  83.       parameters: 1. the PARnet hardware address (2 bytes). This can be
  84.                      any number between 1 and 254.
  85.                   2. the parallel card port address (2 bytes). In most
  86.                      cases this is 0378h for LPT1, 03bch for LPT2 or
  87.                      0278h for LPT3. But also special parallel cards
  88.                      can be used, as long as they work in the same way.
  89.  
  90.       Reading of a packet can be done in two ways:
  91.       - By polling; In this case you must have a continuous loop which
  92.         calls the ParDataReady function. When data is on the line, this
  93.         function will return a 1. Then call ParRead as fast as possible,
  94.         otherwise you'll miss the packet. This way of reading is not
  95.         very advisable. When other routines (like interrupts) take too
  96.         much time, there is a chance that you lose packets.
  97.  
  98.       - Interrupt based; An incoming packet will always generate an
  99.         interrupt on your parallel-card. The interrupt number that is
  100.         generated, depends on the card number & jumper settings, but in
  101.         most cases it will give an IRQ7 interrupt for LPT ports. You
  102.         need to move the interrupt vector to your own routine in which
  103.         you call ParDataReady. If a packet is pending it can be read
  104.         immediately in some temporary buffer(s). It's better to use
  105.         more than one buffer in case the main-program can't handle the
  106.         incoming data very fast.
  107.  
  108.       Examples for these methods of packet reading, see the source codes
  109.       GET.C (polling) and LISTEN.C (interrupt based).
  110.  
  111.       Writing a packet is more easy, just call the ParWrite function
  112.       with the destination address, packet content and packet length.
  113.       The kernel will do the rest for you.
  114.  
  115.       Examples for packet writing, see TALK.C or DUMP.C.
  116.  
  117.       The format of a PARnet packet is given in PARDEV.H. More
  118.       information is written in the comments of the various test
  119.       programs.
  120.  
  121.       The executables are compiled with the non-interface kernel 
  122.       version. If you want to build and use the interface, rename
  123.       the PARKERN.OLD file to PARKERN.ASM and re-compile the sources.
  124.  
  125.  
  126. The Interface
  127.  
  128.       In this version of PARNET-PC it's not needed anymore to build a
  129.       special PARnet interface when you have only 2 machines
  130.       interconnected. If you want to have more on the same line, read 
  131.       the following to prevent burning CIA's:
  132.  
  133.  
  134.       On PC's you will have to build a PARnet-interface before you can
  135.       use the software. Despite of the enormous amount of Parallel- &
  136.       Multi I/O cards fabricated for PC compatibles, only a few are
  137.       compatible to eachother. n most cases the cards are so
  138.       'hard-built' (something like 'hard-coded'?) that they can only be
  139.       used for output to printers. This in contradiction to the Amiga
  140.       parallel-port, which is multifunctional (printers, digitizers,
  141.       midi, etc).
  142.  
  143.       That's why I made a full centronics compatible interface which
  144.       should work allright on most compatible parallel cards.
  145.  
  146.       A 'compatible parallel card' must have the following lines:
  147.       - 8 data lines for output (pullups not needed)
  148.       - 4 control lines for output; Strobe, Auto linefeed, Init and
  149.         Select In. These lines must be pulled up!
  150.       - 9 status lines for input; Error, Strobe, Auto linefeed, Init,
  151.         Select In, Paper Out, Select, Acknowledge and Busy.
  152.  
  153.       If your card does not have this (yes, it's hard to check on new
  154.       cards with only 1 chip), the interface won't work! In that case,
  155.       go to a dump-shop and ask for a very old XT-parallel-card built
  156.       with TTL-IC's. 
  157.  
  158.       When you have the right card, then you can start building the
  159.       interface.
  160.       The following parts are needed:
  161.  
  162.       - 2x  74LS00
  163.       - 2x  74LS07
  164.       - 2x  74LS244
  165.       - 2x  74LS273
  166.       - 1x  25 pin Sub D connector female
  167.       - 1x  25 pin Sub D connector male
  168.       - 2x  100nF capacitors when the interface can not handle high
  169.         speeds (see text how to connect them).
  170.       - 11x 4.7 KOhm pullup resistors when you are going to connect
  171.         only PC's with eachother. These are NOT NEEDED when you have at
  172.         least one Amiga on the line.
  173.  
  174.       The schematic for the interface is shown in the file PARPC.IFF.
  175.       It should provide enough information for the experienced
  176.       soldering-iron-users. I've no PCB-layout for the interface yet,
  177.       the prototype was built with SMD-IC's on a piece of cardboard
  178.       some glue and a lot of wires. It was so small, that it could fit
  179.       between the 2 sub-D connectors. So when somebody has a good
  180.       PCB-layout program and lot's of time, can he build a PCB-layout
  181.       for me? :-)
  182.  
  183.       There's one disadvantage of the interface: it needs power. Since
  184.       a normal parallel-port does not provide +5V power, you'll need to
  185.       get it from elsewhere. You can connect the circuit to an extern
  186.       5 volts adapter (like I did), or you can take a +5V line from the
  187.       power-supply inside your computer (be sure you have the right
  188.       one).
  189.  
  190.       Before plugging the interface in your computer, please recheck
  191.       all connections and check it again with power on it (short
  192.       circuits?). When powered, the outputs of the 74LS244's and the
  193.       74LS07's should be high (near +5 volts), when you have none of
  194.       the inputs connected.
  195.  
  196.       When you think it's save enough, put the interface on the
  197.       parallel-connector (ofcourse with the computer OFF), turn the
  198.       computer on and check if it starts up normally.
  199.  
  200.       Now it's time to make the cable and the rest of the network
  201.       (see next part).
  202.  
  203.       NOTE: If you get errors when transferring large amounts of data, 
  204.             try to connect 100nF capacitors from pin 6 (~WD) and pin 8
  205.             (~RC) of the 74LS74A to ground (pin 7). 
  206.  
  207.  
  208. Cable Connections
  209.  
  210.       When using PARnet, you have to make a special cable connection
  211.       between the computers. These connections are NOT the same as in a
  212.       standard 1-to-1 centronics printer cable, a LAPlink or other
  213.       cables used with other software. You need a shielded(!) cable
  214.       with at least 12 wires and on each end a 25 pin MALE Sub-D
  215.       connector.
  216.  
  217.       The connections you make depends on whether you use the PARnet
  218.       interface or not. 
  219.  
  220.  
  221. Cable Connections with PARnet Interface
  222.  
  223.       When using the interface, the following connections need to be
  224.       made:
  225.       - Connect D7-D0, SEL, POUT and BUSY across,
  226.       - Connect ACK (FLAG interrupt) to SEL locally AND across
  227.  
  228.  
  229.                    (2-9)   D7-D0 ------------  D7-D0
  230.                    (12)    POUT  ------------  POUT
  231.       PARNET    <= (11)    BUSY  ------------  BUSY    =>  PARNET
  232.       INTERFACE    (13)    SEL   --+------+--  SEL         INTERFACE
  233.                    (10)    ACK   -/        \-  ACK
  234.                    (18-22) GND   ------------  GND
  235.       (Or Amiga                                         (Or Amiga
  236.        parallel port)                                    parallel port)
  237.  
  238.              Cable connections for the PARNET-PC INTERFACE (!)
  239.  
  240.  
  241.  
  242. Cable Connections without an interface
  243.  
  244.       When you want to have a point-to-point network between only 2
  245.       computers, you can connect the following cable directly to your
  246.       parallel card. You can make a connection between a PC and an Amiga,
  247.       or between 2 PC's.
  248.  
  249.  
  250.                    (2-9)   D7-D0  ----------  D7-D0 (2-9)
  251.          PC        ( 1)    STROBE ----------  BUSY  (11)      AMIGA
  252.       PARALLEL  <= (14)    AUTOLF ----------  POUT  (12)  => PARALLEL
  253.         CARD       (16)    INIT   --+----+--  SEL   (13)       PORT
  254.                    (10)    ACK    -/      \-  ACK   (10)
  255.                    (18-22) GND    ----------  GND   (18-22)
  256.  
  257.        Cable connections between PC and Amiga WITHOUT(!) an interface
  258.  
  259.  
  260.  
  261.                    (2-9)   D7-D0  ----------  D7-D0  (2-9)
  262.          PC        ( 1)    STROBE ----------  STROBE ( 1)        PC
  263.       PARALLEL  <= (14)    AUTOLF ----------  AUTOLF (14)  => PARALLEL
  264.         CARD       (16)    INIT   --+----+--  INIT   (16)       CARD
  265.                    (10)    ACK    -/      \-  ACK    (10)
  266.                    (18-22) GND    ----------  GND    (18-22)
  267.  
  268.         Cable connections between 2 PC's WITHOUT(!) an interface
  269.  
  270.  
  271.       ** NEVER PLUG IN AN UNMODIFIED CABLE BETWEEN THE COMPUTERS!
  272.  
  273.       ** DOUBLE CHECK YOUR CABLE BEFORE INSTALLATION!
  274.  
  275.  
  276. The Network
  277.  
  278.       This chapter is only for those who want to use the PARnet
  279.       Interface to allow more than 2 computers to be connected on the 
  280.       same cable. Don't do the following things when you do not use the
  281.       interface! (unless you like hot chips.)
  282.  
  283.       When you want to have more than 2 computers on the same line,
  284.       continue the cable IN the sub-D connector of the 'last' machine
  285.       (ok, either of the two when having only 2 machines).
  286.  
  287.  
  288.                        Sub-D connector in 2nd computer
  289.                                ========
  290.                                |  2   |     
  291.                                |  /\  |
  292.                           --------  -------
  293.        cable from     =>       | 3/\  |       => cable to 3rd computer
  294.        1st computer       --------  -------
  295.                           _ _  :      : _ _
  296.                                |18/\  |
  297.                           --------  -------
  298.                                |      |
  299.                                ========
  300.  
  301.       Keep the connections in a 'straight line'. Never make splits,
  302.       stars or rings like these:
  303.  
  304.         Comp            Comp            Comp          
  305.          |             / |  \            / \            Comp-Comp-Comp
  306.         Comp          /  |   \          /   \             |
  307.        /   \       Comp Comp Comp     Comp--Comp        Comp
  308.       Comp Comp
  309.  
  310.          Examples of *WRONG* cable connections       *good* connections
  311.  
  312.       When you have only PC's interconnected, you must place a pullup-
  313.       resistor-pack in the interface of the LAST PC in the network. 
  314.       This can be done with 4.7 KOhm resistors in one interface or, to
  315.       make it real good, resistors of 8.2 KOhm in either interface on
  316.       each end in the line.
  317.  
  318.  
  319.           5V     PC      PC              5V      PC     PC     5V
  320.            |      |       |               |       |      |      |
  321.         PR4.7K--Iface   Iface   or:    PR8.2K--Iface  Iface--PR8.2K
  322.                   |       |                       |      |
  323.                   +-------+                       +------+
  324.  
  325.            A PC-only network (needs additional pullup-resistors)
  326.  
  327.  
  328.       When you have one or more Amiga's connected (which have built-in
  329.       pullups), try placing them on the ends of the line. You can't
  330.       connect more than 3 Amiga's (or 2 Amiga's and a PC) on the same
  331.       line without buffering your CIA's.
  332.  
  333.       An example of a PC/Amiga PARnet network:
  334.  
  335.            +-----+     +---+      +-----+
  336.            |Amiga|     |PC |      |Amiga|
  337.            +--+--+     +-+-+      +--+--+
  338.               |       +--+--+        |
  339.               |       |Iface|        |
  340.               |       +--+--+        |
  341.               |          |           |
  342.               +----------+-----------+
  343.  
  344.       In this configuration NO additional pullup-resistors are needed
  345.       (they're in both Amiga's). 
  346.  
  347.  
  348. Contacts & Updates
  349.  
  350.       Since this software is still in beta, many changes/bugfixes/
  351.       optimalisation will occur. There's no stable source where you can
  352.       get the latest version. I don't want to put this on Aminet yet or
  353.       any other software distribution site, because the software is
  354.       still 'BUGware' and has no functionality at all.
  355.  
  356.       If you *think* you have the latest version and you noticed a bug,
  357.       or you made some optimalisations, wrote additional routines, etc,
  358.       etc. Please contact me at:
  359.  
  360.       Internet: S.A.Pechler@bdk.tue.nl (or: bdaasp@rc5.urc.tue.nl)
  361.       BITnet  : bdaasp@heitue51
  362.       UUCP    : ..!mcsun!sun4nl!rc5.urc.tue.nl!bdaasp
  363.       X.400   : c=nl;admd=400net;prmd=surf;o=tue;ou=urc;s=bdaasp
  364.  
  365.  
  366.       Or by normal mail:
  367.  
  368.       S.A.Pechler
  369.       Diederikstraat 66
  370.       NL-5421 EX Gemert
  371.       The Netherlands
  372.  
  373.  
  374.       Thank you for having interest in PARnet-PC.
  375.